<#macro page url pager>
<div class="page-content">
	<div class="page-info">
		当前第<span>${pager.number+1}</span>页 | 第
		<#if pager.totalElements gt 0>
			<span> ${(pager.number*pager.size)+1}</span> - 
			<#if pager.number==(pager.totalPages-1)>
				<span>${pager.totalElements} </span>
			<#else>
				<span>${(pager.number*pager.size)+pager.size} </span>
			</#if>
		<#else>
		0
		</#if>
		条记录 | 共 <span>${pager.totalElements}</span> 条
	</div>
	<#if pager.totalPages gt 1>
		<#assign sort=pager.sort?replace(': ',',') />
		<div class="page-list">
			<#if pager.number!=0>
				<a onclick="pageGo('${url}','${pager.sort}',0)"><i class="iconfont icon-backward"></i></a>
				<a onclick="pageGo('${url}','${sort}',${pager.number-1})"><i class="iconfont icon-last-page"></i></a>
				<#else>
				<a class="disable"><i class="iconfont icon-backward"></i></a>
				<a class="disable"><i class="iconfont icon-last-page"></i></a>
			</#if>
			
			<!-- 定义起始页码 -->
			<#assign start=0 />
			<!-- 定义结束页码 -->
			<#assign end=pager.totalPages-1 />
			
			<#assign pages=start..end />
			
			<#list pages as pages>
				<#if pages=pager.number>
					<a class="select" onclick="pageGo('${url}','${sort}',${pages})">${pages+1}</a>
					<#else>
					<a onclick="pageGo('${url}','${sort}',${pages})">${pages+1}</a>
				</#if>
			</#list>
			
			<#if pager.number!=(pager.totalPages-1)>
				<a onclick="pageGo('${url}','${sort}',${pager.number+1})"><i class="iconfont icon-next-page"></i></a>
				<a onclick="pageGo('${url}','${sort}',${end})"><i class="iconfont icon-forward"></i></a>
				<#else>
				<a class="disable" ><i class="iconfont icon-next-page"></i></a>
				<a class="disable"><i class="iconfont icon-forward"></i></a>
			</#if>
		</div>
	</#if>
</div>

</#macro>
